package translinkApp.views.activity;

import translinkApp.views.dialog.LachDialogArguments;
import translinkApp.views.dialog.LachDialogData;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public abstract class DialogLoaderActivity extends Activity implements DialogLoaderActivityInf {
	DialogLoaderActivityHelper impl;

	public DialogLoaderActivityHelper getDialogHelper() {
		if (impl == null) {
			impl = new DialogLoaderActivityHelper(this);
		}
		return impl;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

	}

	public void showLachDialog(int number, LachDialogArguments args) {
		getDialogHelper().showLachDialog(number, args);
	}

	public void showLachDialog(int number, LachDialogArguments args, LachDialogData data) {
		getDialogHelper().showLachDialog(number, args, data);
	}

	public void recreateDialog(Bundle savedInstanceState) {
		getDialogHelper().recreateDialog(savedInstanceState);
	}

	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		getDialogHelper().onSaveInstanceState(outState);
	}

	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		getDialogHelper().onActivityResult(requestCode, resultCode, data);
	}

}
